import { request } from '@/utils/request.js'

/**
 * 销售提成批次 API JS
 */

export default {

  /**
   * 获取销售提成批次分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'finance/bonusBill/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加销售提成批次
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'finance/bonusBill/save',
      method: 'post',
      data
    })
  },
  cancel (data = {}) {
    return request({
      url: 'finance/bonusBill/cancel',
      method: 'put',
      data
    })
  },

  /**
   * 更新销售提成批次数据
   * @returns
   */
  update (id, data = {}) {
    return request({
      url: 'finance/bonusBill/update/' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取销售提成批次
   * @returns
   */
  read (id,data={}) {
    return request({
      url: 'finance/bonusBill/read/' + id,
      method: 'get',
      data
    })
  },

  /**
   * 将销售提成批次删除，有软删除则移动到回收站
   * @returns
   */
  deletes (data) {
    return request({
      url: 'finance/bonusBill/delete',
      method: 'delete',
      data
    })
  },

  addFee (data) {
    return request({
      url: 'finance/bonusBill/addFee',
      method: 'post',
      data
    })
  },
  
  delFee (data) {
    return request({
      url: 'finance/bonusBill/delFee',
      method: 'post',
      data
    })
  },


}